package org.example;



import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @program: maven3
 * @description:
 * @author: zy
 * @create: 2025-09-09 15:20
 */
public class App5 {
    public static void main(String[] args) {
        ApplicationContext context=new AnnotationConfigApplicationContext(AppConfig5.class);
        //从spring容器获取所有它托管的bean的定义名
        String[] names=context.getBeanDefinitionNames();
        for(String name:names){
            System.out.println(name);
        }
    }
}
